package sctu.edu.java.year2016.team07.shihaocheng.day20160521.Chapter5_1;

/**
 * Created by admin on 2016/5/22.
 *创建一个arr[]数组，并遍历输出
 */
import java.util.Scanner;
public class chapter5_1 {
    public static void main(String[] args){
        Scanner in=new Scanner(System.in);
        int n,i;
        System.out.print("请输入数组a[]的元素个数:");

        n=in.nextInt();

        int[] a=new int[n];

        System.out.println("请输入数组");

        for(i=0;i<n;i++){

            a[i]=in.nextInt();

        }

            System.out.println("数组的遍历为:");
            for(int b:a)

                System.out.println(""+b);


    }
}